package almacenes.modelo.entidad;

// Generated 16/02/2012 04:45:02 PM by Hibernate Tools 3.4.0.CR1

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Departamentoxproveedor generated by hbm2java
 */
@Entity
@Table(name = "DEPARTAMENTOXPROVEEDOR", uniqueConstraints = @UniqueConstraint(columnNames = {
		"ID_DEPARTAMENTO", "ID_PROVEEDOR" }))
public class Departamentoxproveedor implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private long idDepartamentoxproveedor;
	private Departamento departamento;
	private Proveedor proveedor;
	private Integer idEstadoMae;
	private String usuReg;
	private Date fecReg;
	private String usuAct;
	private Date fecAct;
	private List<Agrupamiento> agrupamientos = new ArrayList<Agrupamiento>();

	public Departamentoxproveedor() {
	}

	public Departamentoxproveedor(long idDepartamentoxproveedor,
			Departamento departamento, Proveedor proveedor) {
		this.idDepartamentoxproveedor = idDepartamentoxproveedor;
		this.departamento = departamento;
		this.proveedor = proveedor;
	}

	public Departamentoxproveedor(long idDepartamentoxproveedor,
			Departamento departamento, Proveedor proveedor, Integer idEstadoMae,
			String usuReg, Date fecReg, String usuAct, Date fecAct,
			List<Agrupamiento> agrupamientos) {
		this.idDepartamentoxproveedor = idDepartamentoxproveedor;
		this.departamento = departamento;
		this.proveedor = proveedor;
		this.idEstadoMae = idEstadoMae;
		this.usuReg = usuReg;
		this.fecReg = fecReg;
		this.usuAct = usuAct;
		this.fecAct = fecAct;
		this.agrupamientos = agrupamientos;
	}

	@Id
	@Column(name = "ID_DEPARTAMENTOXPROVEEDOR", unique = true, nullable = false, precision = 10, scale = 0)
	public long getIdDepartamentoxproveedor() {
		return this.idDepartamentoxproveedor;
	}

	public void setIdDepartamentoxproveedor(long idDepartamentoxproveedor) {
		this.idDepartamentoxproveedor = idDepartamentoxproveedor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_DEPARTAMENTO", nullable = false)
	public Departamento getDepartamento() {
		return this.departamento;
	}

	public void setDepartamento(Departamento departamento) {
		this.departamento = departamento;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_PROVEEDOR", nullable = false)
	public Proveedor getProveedor() {
		return this.proveedor;
	}

	public void setProveedor(Proveedor proveedor) {
		this.proveedor = proveedor;
	}

	@Column(name = "ID_ESTADO_MAE", precision = 2, scale = 0)
	public Integer getIdEstadoMae() {
		return this.idEstadoMae;
	}

	public void setIdEstadoMae(Integer idEstadoMae) {
		this.idEstadoMae = idEstadoMae;
	}

	@Column(name = "USU_REG", length = 10)
	public String getUsuReg() {
		return this.usuReg;
	}

	public void setUsuReg(String usuReg) {
		this.usuReg = usuReg;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FEC_REG", length = 7)
	public Date getFecReg() {
		return this.fecReg;
	}

	public void setFecReg(Date fecReg) {
		this.fecReg = fecReg;
	}

	@Column(name = "USU_ACT", length = 10)
	public String getUsuAct() {
		return this.usuAct;
	}

	public void setUsuAct(String usuAct) {
		this.usuAct = usuAct;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FEC_ACT", length = 7)
	public Date getFecAct() {
		return this.fecAct;
	}

	public void setFecAct(Date fecAct) {
		this.fecAct = fecAct;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "departamentoxproveedor")
	public List<Agrupamiento> getAgrupamientos() {
		return this.agrupamientos;
	}

	public void setAgrupamientos(List<Agrupamiento> agrupamientos) {
		this.agrupamientos = agrupamientos;
	}

}
